﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;

namespace HRProject.Code.DTO
{
    public class BLMonthlyWorktimeSheet
    {
        private int year;
        private int month;
        private List<BLMonthlyWorktime> agentsWorktime;

        public List<BLMonthlyWorktime> AgentsWorktime
        {
            get { return agentsWorktime; }
            set { agentsWorktime = value; }
        }

        public int Month
        {
            get { return month; }
            set { month = value; }
        }

        public int Year
        {
            get { return year; }
            set { year = value; }
        }

        public float Total
        {
            get
            {
                float result = 0;
                foreach(BLMonthlyWorktime mw in agentsWorktime)
                {
                    result += mw.Total;
                }
                return result;
            }
        }

        public BLMonthlyWorktimeSheet(int year, int month)
        {
            this.year = year;
            this.month = month;
            this.agentsWorktime = new List<BLMonthlyWorktime>();
        }
    }
}
